package com.struts.web.user.manage.system;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;

import com.base.Constants;
import com.ibatis.po.user.TUser;
import com.lg.system.CLGAction;
import com.struts.deal.user.manage.system.BaseInfoDael;
import com.struts.web.user.manage.system.BaseInfoForm;

public class BaseInfoAction extends CLGAction {
/**
 * 处理用户基本信息
 */
	public ActionForward execute(ActionMapping actionMapping,
            ActionForm actionForm,
            HttpServletRequest request,
            HttpServletResponse response) throws
Exception {
		TUser user = (TUser)request.getSession().getAttribute("TUser");
		if(user==null){
			ActionMessages msgs = new ActionMessages();
			msgs.add("userReLogin",new ActionMessage(Constants.USER_RE_LOGIN));
			saveErrors(request, msgs);
			return actionMapping.findForward("userlogin");
		}
		BaseInfoForm aWebForm = (BaseInfoForm)actionForm;
//		BaseInfoDael.loadBaseInfo(request, response, aWebForm);
        return actionMapping.getInputForward();
  }
}
